<template>
  <div class="statistics">
    <!-- 统计分析模块 -->
    <!-- <div class="tablistbox">
      <a
        href="javascript:void(0);"
        :class="index == isactive ? 'active' : ''"
        @click="handelchange(index)"
        :key="index"
        v-for="(item, index) in tablist"
        >{{ item.name }}
      </a>
    </div>
    <projectStatistics :is="currentView" keep-alive></projectStatistics> -->
  </div>
</template>

<script>
import projectStatistics from '@/components/statistics/projectStatistics.vue';
import scoreStatistics from '@/components/statistics/scoreStatistics.vue';

export default {
  name: 'Statistics',
  data() {
    return {
      isactive: 0,
      tablist: [
        {name: '项目统计'},
        {name: '成绩统计'}
      ],
      currentView: 'projectStatistics'
    };
  },
  components: {
    projectStatistics,
    scoreStatistics
  },
  methods: {
    handelchange(index) {
      this.isactive = index;
      if (index === 0) {
        this.currentView = 'projectStatistics';
      } else {
        this.currentView = 'scoreStatistics';
      }
    }
  }
};
</script>

<style lang="less" scoped>
.statistics {
  .tablistbox {
    width: 98%;
    height: 45px;
    background-color: #fff;
    border-radius: 30px;
    box-shadow: 0px 1px 2px 0px #b9b9b9;
    margin: 10px 20px 15px 20px;
    display: flex;
    align-items: center;
    position: relative;
    a {
      color: #333;
      // width: 180px;
      height: 35px;
      padding: 0 30px;
      margin: 0 100px 0 10px;
      display: inline-block;
      line-height: 35px;
      text-align: center;
      font-size: 16px;
      font-weight: 500;
      transition: all 0.3s;
      border-radius: 25px;
    }
    a:hover {
      color: #fff;
      background-image: linear-gradient(270deg, #1160cf 0%, #cd06bf 100%);
      box-shadow: 1px 0px 5px #1160cf, -1px 0px 5px #cd06bf;
    }
    .active {
      color: #fff;
      background-image: linear-gradient(270deg, #1160cf 0%, #cd06bf 100%);
      box-shadow: 1px 0px 5px #1160cf, -1px 0px 5px #cd06bf;
    }
  }
}
</style>
